#!/bin/bash
path="/Users/$(whoami)/Library/Developer/Xcode/UserData/CodeSnippets/"
# 检查目录是否存在
if [ ! -d "$path" ]; then
    echo "创建目标目录: $path"
    mkdir -p "$path"
fi

#将code目录下的代码片段安装到Xcode中
cp ./code/* $path
if [ ${?} -eq 0 ]
then
    echo "代码片段安装成功"
else
    echo "代码片段安装失败"
fi

